Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@walletconnect/types
Advanced tools
@walletconnect/types is a TypeScript package that provides type definitions for the WalletConnect protocol. It is used to ensure type safety and consistency when developing applications that integrate with WalletConnect.
Session Types
Defines the structure of a WalletConnect session, including details about the peer, permissions, and expiry.
import { SessionTypes } from '@walletconnect/types';
const session: SessionTypes.Created = {
topic: 'abc123',
relay: { protocol: 'waku' },
peer: { metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
permissions: { blockchain: { chains: ['eip155:1'] }, jsonrpc: { methods: ['eth_sendTransaction'] } },
expiry: 1234567890
};
Proposal Types
Defines the structure of a WalletConnect proposal, including details about the proposer and required namespaces.
import { ProposalTypes } from '@walletconnect/types';
const proposal: ProposalTypes.Struct = {
id: 1,
params: {
proposer: { publicKey: '0xabc123', metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
requiredNamespaces: { eip155: { methods: ['eth_sendTransaction'], chains: ['eip155:1'], events: ['accountsChanged'] } }
}
};
Error Types
Defines the structure of error types used in WalletConnect, including error codes and messages.
import { ErrorTypes } from '@walletconnect/types';
const error: ErrorTypes.Provider = {
code: 4001,
message: 'User rejected the request.'
};
web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. It provides functionalities for interacting with smart contracts, sending transactions, and more. Unlike @walletconnect/types, which focuses on type definitions for WalletConnect, web3.js provides a comprehensive set of tools for Ethereum development.
ethers.js is a library for interacting with the Ethereum blockchain and its ecosystem. It provides utilities for sending transactions, interacting with smart contracts, and more. While @walletconnect/types provides type definitions for WalletConnect, ethers.js offers a full suite of tools for Ethereum development, including wallet management and contract interaction.
web3modal is a library that allows developers to easily integrate multiple wallet providers into their applications. It provides a modal for users to select their preferred wallet. While @walletconnect/types focuses on type definitions for WalletConnect, web3modal provides a user interface for connecting to various wallet providers, including WalletConnect.
Typescript Types for WalletConnect
FAQs
Typings for WalletConnect Protocol
The npm package @walletconnect/types receives a total of 426,305 weekly downloads. As such, @walletconnect/types popularity was classified as popular.
We found that @walletconnect/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.